/* Copyright (c) 2008 Google Inc.
*  Copyright (c) 2009 Pierre Henri Kuate.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

namespace org.opensocial.data
{
    /// <summary> Class representing the Albums, collections of media items (video, image, sound).
    /// </summary>
    /// <author>  K
    /// </author>
    public class Album : OpenSocialObject
    {
        /// <summary> Retrieves the OpenSocial ID associated with the instance. Returns an
        /// empty string if no ID has been set.
        /// </summary>
        public string Id
        {
            get { return getStringValue("id"); }
        }

        public string ThumbnailUrl
        {
            get { return getStringValue("thumbnailUrl"); }
        }

        public string Url
        {
            get { return getStringValue("url"); }
        }

        public string Title
        {
            get { return getStringValue("title"); }
            set { setValue("title", value); }
        }

        public string Caption
        {
            get { return getStringValue("caption"); }
            set { setValue("caption", value); }
        }

        public string Description
        {
            get { return getStringValue("description"); }
        }

        public Address Location
        {
            get { return singleOrDefaultObjectOfCollection<Address>("location"); }
        }

        public string OwnerId
        {
            get { return getStringValue("ownerId"); }
        }

        public MediaItemType? MediaType
        {
            get { return getMediaType("mediaType"); }
        }

        public System.Collections.Generic.IList<string> MediaMimeType
        {
            get { return getStringValues("mediaMimeType"); }
        }

        public int? MediaItemCount
        {
            get { return getIntegerValue("mediaItemCount"); }
        }
    }
}